<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/1
 * Time: 16:34
 */

namespace app\api\controller\v1;


use app\api\controller\BaseController;
use app\api\service\WxNotify;
use app\api\validate\IDMustBePostiveInt;
use app\api\service\PayService;
use think\Controller;

class Pay extends BaseController
{

    protected $beforeActionList = [
        'checkExclusiveScope'
    ];

    public function getPreOrder($id=''){
        (new IDMustBePostiveInt())->goCheck();
        $orderService = new PayService($id);
        return $orderService->pay();
    }

    //微信支付回调地址
    public function redictNotify(){
        $wxNotify = new WxNotify();
        $wxNotify->handle();
    }

}